package com.example.demo.refactor;

/**
 * 租赁
 */
public class Rental {

    Movie movie;

    private int dayRented;

    public Rental(Movie movie, int dayRented) {
        this.movie = movie;
        this.dayRented = dayRented;
    }

    public Movie getMovie() {
        return movie;
    }

    public int getDayRented() {
        return dayRented;
    }

    int getFrequentRenterPoints() {
        //add bonus for a two day new release rental
        return movie.getFrequentRenterPoints(dayRented);
    }

    //获取金额
    public double getCharge(){
        return movie.getCharge(getDayRented());
    }

}
